<%@ page language="java" import="java.util.*,client.*" pageEncoding="utf-8"%>  
<%@ page import ="org.jamwiki.*" %>

<%
String path = request.getContextPath();  
String ssoName = null; 
//1.看是否在统一平台登录过
Cookie cookies[] = request.getCookies();  //综合应用平台的COOKIE
String cookieid = null;
String cid = null;
String str_value = null;
System.out.println("cookies ::"+cookies+"<br>");
boolean flag = false;
if(cookies != null)
{
System.out.println("cookies.length::: ::"+cookies.length+"<br>");
for(int i=0;i<cookies.length; i++) 
{
if(cookies[i]==null)
{
continue;
}
System.out.println("cookies["+i+"].getName()"+cookies[i].getName()+"<br>");
System.out.println("cookies["+i+"].getValue()"+cookies[i].getValue()+"<br>"); 
//String endpoint = "http://localhost:8090/axis/services/Version";
String endpoint = "http://iap.sg.gmcc.net/ws/SSO.asmx";  
// 创建一个服务(service)调用(call)     
Object rest=null;
SSOSoap_BindingStub t;
try {
	t = new SSOSoap_BindingStub(new java.net.URL(WikiBase.getUrl()),null);
	rest=t.getUserAccount("__SGMobile-sp__", "sp", "sp", false, cookies[i].getValue());
	if(rest instanceof client.ActionResult)
	{
		client.ActionResult result= (client.ActionResult)rest;
		System.out.print("userid="+result.getReturnMessage()+"<br>");
	}
} catch (Exception e) { 
	e.printStackTrace();
}     
}  
if(null==cookieid){
//b.如果没有成功登录过 跳转到统一登录界面 

}else{
//a。如果成功登录过 取到登录的id 同时去本地数据库中的用户休息  
	ssoName = cookieid+"@SSO";
}
} 
//String configUrl = WikiBase.getUrl();
//if(null != configUrl && configUrl.equalsIgnoreCase(refer))
	//ssoName = request.getParameter("userName"); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<style>   
  BODY   {   
    border:0px solid #E02;
    overflow-y: no; padding-left: 0px;
    padding:-0px 0px 0px; scroll;
	scrollbar-shadow-color:#559CFF; 
	scrollbar-arrow-color:#559CFF; 
	scrollbar-base-color:#D6E3FF; 
	scrollbar-3dlight-color: #559CFF; 
	scrollbar-track-color: #D6E3FF; 
	scrollbar-highlight-color: #D6E3FF; 
	scrollbar-darkshadow-color:#D6E3FF  
  }   
  </style> 
<html>
  <head>
    <base href="<%=basePath%>">
    <title>韶关移动知识维客管理系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

</head>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!-- 
 <iframe id="f" style="margin：0" src="<%=basePath%>wiki/index_iframe.jsp?userName=<%=ssoName%>" width="100%" height="885" frameborder="no"
	border="0" marginwidth="0" marginheight="-2" framespacing="0" scrolling="no"
	allowtransparency="yes" ></iframe>
-->
<iframe id="f" style="margin：0" src="<%=basePath%>wiki/index_iframe.jsp?userName=<%=ssoName%>" width="100%" height="885" frameborder="no"
	border="0" marginwidth="0" marginheight="-2" framespacing="0" scrolling="no"
	allowtransparency="yes" ></iframe>
</body>
</html>
